<template>
  <div class="News">
    <newsCard v-for="v in modules" :key="v.index" :domain="v"></newsCard>
  </div>
</template>
<script>
import { selectModuleById } from "@/api/module";
import newsCard from "@/components/newsCard";
export default {
  components: {
    newsCard,
  },
  data() {
    return {
      total: "",
      page: 1,
      size: 100,
      modules: "",
    };
  },
  mounted() {
    selectModuleById(3, this.page, this.size).then((res) => {
      this.modules = res.data.modules;
      this.total = res.data.total;
    });
  },
};
</script>
